var sharePerson=localStorage.getItem('shareNum')||0;
function main (){
	initShare();
	$('.bq_shareBtn').on('click',shareBq);
	$('.bq_shareImg').on('click',shareImg);
	
	$('.bq_shareBtnMy').click(function(){
		window.location.href='index.html';
	})
	
	$('.yaoqingNowClose').click(function(){
		$('.bq_markBuQMark').hide();
		
	})
	$('.bq_shareBtnOther').click(function(){
		$('.bq_markBuQMark').show()
	})
	$('.yaoqingNowBtn').click(function(){
		$('.bq_markBuQMark').hide();
		$('.bg_regeiserFormWrap,.bg_regeiserFormWrapMark').show();
	})
	
	$('.bq_regeisterNowclose').click(function(){
		$('.bg_regeiserFormWrap,.bg_regeiserFormWrapMark').hide();
	})
	$('.regesterBtnNow').click(function(){
			$('.bg_regeiserFormWrap,.bg_regeiserFormWrapMark').hide();
	})
	
}

function shareBq(){
	
	sharePerson++;
	
	localStorage.setItem('shareNum',sharePerson);
	$('.bq_shareMark').show();
}
function shareImg(){
	
	alert('生成图片');
}
function initShare(){
	var reffer=document.location.href;
	var num=GetQueryString('num');
	if(num=='01'){
		$('.bq_coutry').html('亚洲');
        $('.bq_shareMapC').attr('src','img/yazhouMap.png')
	}
	else if(num=='02'){
		$('.bq_coutry').html('欧洲');
		$('.bq_shareMapC').attr('src','img/ouzhouMap.png')
	}
	else if(num=='03'){
		$('.bq_coutry').html('非洲');
		$('.bq_shareMapC').attr('src','img/feizhouMap.png')
	}
	else if(num=='04'){
		$('.bq_coutry').html('北美洲');
		$('.bq_shareMapC').attr('src','img/beimeizhouMap.png')
	}
	else if(num=='05'){
		
		$('.bq_coutry').html('南美洲');
		$('.bq_shareMapC').attr('src','img/nammeizhouMap.png')
	}
	else if(num=='06'){
		$('.bq_coutry').html('大洋洲');
		$('.bq_shareMapC').attr('src','img/dayangzhouMap.png')
	}
	else if(num=='07'){
		$('.bq_coutry').html('南极洲');
		$('.bq_shareMapC').attr('src','img/nanjizhouMap.png')
	}
	
	
}

function GetQueryString(name) { 
　　　var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)","i");
     var r = window.location.search.substr(1).match(reg); 
　　　if (r!=null) return (r[2]); 
　　　return null; 
}  


main();
